<?php 
//header("content-type:text/html;charset=utf-8");

require_once 'db_conn.php';  // $conn

$sid = $_GET['sid']; 

// 根据ID查询数据表，返回数据记录



$sql = "
SELECT * 
FROM  t_message 
WHERE  id =$sid
LIMIT 1
";
//echo $sql;

//die;

$result = $conn->query($sql);

$rows = $result->fetch_array(MYSQLI_ASSOC);
//echo "<pre>";

//print_r($rows);

//die;



$data = array();
$data['status'] = 1;
$data['info'] = $rows;
echo json_encode($data);